package com.vst.serverdatalib.entity;

import org.json.JSONObject;

import android.text.TextUtils;

public class HonorUser {

    public int mRanking;

    public String mUserName;

    public String mScore;

    public HonorUser(String string) {
        if (TextUtils.isEmpty(string)) {
            return;
        }
        try {
            JSONObject object = new JSONObject(string);
            this.mRanking = Integer.parseInt(object.optString("idx"));
            this.mUserName = object.optString("name");
            this.mScore = object.optString("score");
        } catch (Exception e) {
        }
    }

    @Override
    public String toString() {
        StringBuffer sb = new StringBuffer("HonorUser:");
        sb.append("mRanking=").append(mRanking).append(",mUserName = ").append(mUserName).append(",mScore = ")
                .append(mScore);
        return sb.toString();
    }
}
